package com.czkt.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.czkt.entity.vo.OrdersLineAndOrders;
import com.czkt.entity.vo.OrdersLineProduct;
import com.czkt.mapper.ContrRptMapper;
import com.czkt.service.ContrRptService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
public class ContrRptServiceImpl implements ContrRptService {
    @Resource
    ContrRptMapper contrRptMapper;

    @Override
    public List<OrdersLineAndOrders> ordersLineByOrdersPrice() {
        return contrRptMapper.ordersLineByOrdersPrice();
    }

    @Override
    public List<OrdersLineAndOrders> ordersLineByOrdersYear() {
        return contrRptMapper.ordersLineByOrdersYear();
    }

    @Override
    public List<OrdersLineAndOrders> ordersLineByYear() {
        return contrRptMapper.ordersLineByYear();
    }

    @Override
    public List<OrdersLineAndOrders> ordersLineByDate() {
        return contrRptMapper.ordersLineByDate();
    }

    @Override
    public List<OrdersLineAndOrders> ordersLineByCustomer() {
        return contrRptMapper.ordersLineByCustomer();
    }

    @Override
    public IPage<OrdersLineProduct> ordersLineAndProduct(String odrCustomer, String originDate, String finishDate, Integer pageIndex, Integer pageSize) {
        Page<OrdersLineProduct> page = new Page<>(pageIndex,pageSize);
        return contrRptMapper.ordersLineAndProduct(page,odrCustomer,originDate,finishDate);
    }
}
